package demo;

import java.util.concurrent.*;

public class Thread03 implements Callable {
    @Override
    public Boolean call() {
        return true;
    }

    public static void main(String[] args) {

        Thread03 t03 = new Thread03();

        ExecutorService service = Executors.newFixedThreadPool(3);

        Future<Object> s1 = service.submit(t03);
        try {
            Object o = s1.get();
            service.shutdownNow();
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }

    }
}
